class JQProductSimpleListService extends global.JQService {
	
    async do_action(){
		
		if(!this.conn)console.log('do_action::conn error');
		let data_obj = this.req_obj.data_obj;
		let inst = global.JQTableIF.instance('cp_table',this.conn);
		
	   /*
	   'menu_number','menu_name','m_picture','u_id','sort  menu_sort'
	   
	   'menu_id',// int(4) ai pk
	   'menu_number',// varchar(120) 
	   'menu_name',// varchar(64) 
	   'm_picture',// varchar(255) 
	   'u_id',// int(11) 
	   'sort',// int(11) 
	   'menu_reserve',// int(11) 
	   'menu_no',// int(5) 
	   'menu_pname',// varchar(64) 
	   'menu_online',// int(11) 
	   'ex_no',// int(11)
	   
	   */
	   
		let wrap = {};
		console.log('do_action 11111');

		// let menu_id = data_obj?data_obj.menu_id:null;
		let menu_id= 0;
		if(data_obj && data_obj.obj && data_obj.obj.menu_id){
			menu_id=data_obj.obj.menu_id;
		}
		if(!menu_id){
			throw {'code':global.consts.Error.ERROR_PARAM,
				'message':global.consts.Message.ERROR_PARAM};
		}
		let params=super._addParams(['menu_id=',menu_id]);
		
		console.log('do_action 22222');
		
		
		let first= data_obj.first;
		let size = data_obj.size;	
		//async query2(alias_keys,alias_a_keys, a_keys,a_params, b_table,alias_b_keys,b_keys,b_params,joint,on_a,on_b,params, first,size,group_by,order_by,is_count){}//(alias_a_keys, a_keys,a_params,alias_b_keys, b_table,b_keys,b_params,joint,on_a,on_b,params, first,size,group_by,order_by,is_count){}
		let list = await inst.query(['cp_id','menu_id','cp_name','sort'],params,first,size,null,'sort desc');
		   
		wrap.list=list;
		// wrap.total=count;
		return wrap;			
	}

}
module.exports = JQProductSimpleListService;